package com.example.yls.demoa;

import android.support.v4.app.*;
import android.support.v4.app.Fragment;

import java.util.List;

/**
 * Created by yls on 2019/4/19.
 */

public class MyframgentPageAdapter extends FragmentPagerAdapter{
 private  FragmentManager fragmentManager;
 private List<Fragment>listfragment;
    public MyframgentPageAdapter(FragmentManager fm,List<Fragment> list) {
        super(fm);
        this.fragmentManager=fm;
        this.listfragment=list;
    }

    @Override
    public Fragment getItem(int position) {
        return listfragment.get(position);
    }

    @Override
    public int getCount() {
        return listfragment.size();
    }

}
